// 导入axios实例
import httpRequest from '../request/index';
// sha256加密
import sha256 from 'crypto-js/sha256';


// 搜索视频
export function search(vcate, keywords) {
    let params = `${vcate}${keywords}XpFaEDYkQH`;
    let sign = sha256(params).toString().substring(0, 15);
    return httpRequest({
        url: `/search?vcate=${vcate}&keywords=${keywords}&time=${Math.round(new Date().getTime() / 1000)}&sign=${sign}`,
        method: 'get',
    });
}